]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
st/entry: Invalidate shadow on cursor position/size changes
authorJonas Dreßler <verdre@v0yd.nl>
Fri, 5 Mar 2021 10:31:26 +0000 (11:31 +0100)
committerMarge Bot <marge-bot@gnome.org>
Mon, 14 Feb 2022 12:52:20 +0000 (12:52 +0000)
When text shadows are used, the cursor indicating the current position
also casts a shadow.

This means we have to regenerate the shadow texture after the cursor
position changed, so invalidate the shadow in that case.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1744>

src/st/st-entry.c

index f8b07d043cbfc151cff52caccafa87301e8a16f7..d50c2548bd1b75e89fb93755e39fdbe86d2db82d 100644 (file)
@@ -539,7 +539,11 @@ static void
 clutter_text_cursor_changed (ClutterText *text,
                              StEntry     *entry)
 {
+  StEntryPrivate *priv = ST_ENTRY_PRIV (entry);
+
   st_entry_update_hint_visibility (entry);
+
+  g_clear_pointer (&priv->text_shadow_material, cogl_object_unref);
 }
 
 static void